//
//  WJMianLayout.h
//  WJBSApp
//
//  Created by 王景伟 on 2018/11/22.
//  Copyright © 2018 王景伟. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "WJMainModel.h"

#define kBSCellMargin 10      // cell 顶部灰色留白
#define kBSContentMargin 5
#define kBSContentW  (WIDTH - kBSCellMargin * 2)

#define kBSHeaderW  30

#define kBSVipW  24
#define kBSVipH  18

#define kBSHtmlH HEIGHT / 4.0
#define kBSTagH 15
#define kBSButH 30

#define kBSNameFont 13      // cell 顶部灰色留白
#define kBSTimeFont 11      // cell 顶部灰色留白
#define kBSTitleFont 16
#define kBSCommentFont 15
#define kBSTagFont 14

#define kBSCountFont 13

/// 风格
typedef NS_ENUM(NSUInteger, WJLayoutStyle) {
    WJMianLayoutImage = 0,
    WJMianLayoutGif,
    WJMianLayoutVideo,
    WJMianLayoutAudio,
    WJMianLayoutHtml,
    WJMianLayoutText,
};

@interface WJMianLayout : NSObject

- (instancetype)initWithModel:(WJMainModel *)model;

@property (nonatomic, strong) WJMainModel *model;
@property (nonatomic, assign) WJLayoutStyle style;

@property (nonatomic, assign) CGFloat cellHeight;

@property (nonatomic, assign) CGRect vipRect;

@property (nonatomic, assign) CGRect titleRect;

@property (nonatomic, assign) CGRect imageRect;
@property (nonatomic, assign) NSString *imageName;
@property (nonatomic, assign) double imageScale;
@property (nonatomic, assign) BOOL isScale;

@property (nonatomic, assign) CGRect countRect;
@property (nonatomic, assign) CGRect durationRect;
@property (nonatomic, strong) NSString *countText;
@property (nonatomic, strong) NSString *durationText;

@property (nonatomic, assign) CGFloat commentY;
@property (nonatomic, strong) NSMutableArray<NSNumber *> *commentHeights;
@property (nonatomic, assign) CGRect tagRect;

@property (nonatomic, assign) CGRect upButRect;
@property (nonatomic, assign) CGRect downButRect;
@property (nonatomic, assign) CGRect forwardButRect;
@property (nonatomic, assign) CGRect commentButRect;

@property (nonatomic, strong) NSIndexPath *indexPath;
@end

